import { defineStore } from 'pinia';
import { ref } from 'vue';

export const useOrderStore = defineStore('checkInfo', () => {
  const checkInfo = ref({})
  const setCheckInfo = async (query) => {
    checkInfo.value = query;
  }
  const clearCheckInfo = () => {
    checkInfo.value = {};
  };
  const getCheckInfo = () => {
    return checkInfo.value;
  };

  return {
    setCheckInfo,
    getCheckInfo,
    checkInfo,
    clearCheckInfo,
  }
}, {
  persist: true, //开启持久化存储
});